package cn.itcast.elastic.dao;

import cn.itcast.elastic.pojo.Goods;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author Eric
 * @version v1.0
 * @package cn.itcast.elastic.findByPriceBetweendao
 * @date 2019/6/14 20:22
 * @description:
 **/
public interface GoodsRepository extends ElasticsearchRepository<Goods,Long> {
    /**
     * 根据价格区间查询
     * @param from 开始价格
     * @param to 结束价格
     * @return 符合条件的goods
     */
    List<Goods> findByPriceBetween(Double from, Double to);
}
